import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:untitled/pages/home/info/index.dart';
import 'package:untitled/pages/home/tab_index/index_navigator.dart';
import 'package:untitled/pages/home/tab_index/index_recommend.dart';
import 'package:untitled/widgets/common_swipper.dart';
import 'package:untitled/widgets/search_bar/index.dart';

/*
* 首页
* */
class TabIndex extends StatelessWidget {
  const TabIndex({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: SearchBar(
        showLocation: true,
        showMap: true,
        onSearch: (){
          Navigator.of(context).pushNamed('search');
        },
      ),backgroundColor: Colors.white,),

      body: ListView(
        children: [
          CommonSwiper(),
          IndexNavigator(),
          IndexRecomment(),
          Info(showTitle: true,),

        ],
      ),
    );
  }
}
